<%--
    @Description： 设备增加页面
    @Author： 樊双峰
    @Date： 2018-06-30 1:19
--%>
<div class="bjui-pageHeader"></div>
<div class="bjui-pageContent tableContent">
    <form id="addfinalyieldfrom" class="pageForm nice-validator n-red" data-reload-navtab="true" data-toggle="validate"
          action="${request.getContextPath()}/EqpBoard/saveEqp?uid=${DwrEqpBoard?.id}&x=70&y=70"
          method="post"
          onsubmit="return checkInfo();">
        <div class="bjui-searchBar">
            <table class="table table-condensed table-hover">
                <tr>
                    <td>
                        <label class="control-label x90">设备ID<strong><span class="text-danger">*</span></strong>：</label>
                    </td>
                    <td>
                        <g:select name="eqpId" from="${addEqp}" data-toggle="selectpicker" data-live-search="true"
                                  optionKey="EQP_ID" optionValue="EQP_ID" value="${EQP_ID}"
                                  data-width="190" data-rule="required"
                                  noSelection="['': '-- 请选择 --']"/>&nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="control-label x90">宽度<strong><span class="text-danger">*</span></strong>：</label>
                    </td>
                    <td>
                        <input name="width" value="${DwrEqpBoard.width}" placeholder="请输入设备宽..." data-rule="required" data-rule="digits"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="control-label x90">高度<strong><span class="text-danger">*</span></strong>：</label>
                    </td>
                    <td>
                        <input name="height" value="${DwrEqpBoard.height}" placeholder="请输入设备高..." data-rule="required" data-rule="digits"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="control-label x90">图层<strong><span class="text-danger">*</span></strong>：</label>
                    </td>
                    <td>
                        <input name="containX" value="${DwrEqpBoard.containX}" placeholder="请输入设备图层..." data-rule="required" data-rule="digits"/>
                    </td>
                </tr>
            </table>
        </div>
        <input type="hidden" name="id" value="${DwrEqpBoard?.id}"/>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn btn-close">关闭</button></li>
        <li><button type="button" class="btn btn-red clear" onclick='javascript:clearInfo()'>清空</button></li>
        <li><button type="submit" class="btn btn-green save">保存</button></li>
    </ul>
</div>
<script type="text/javascript">
    function clearInfo() {
        $("input").val("");
        $("select").val("===请选择===")
    }
    function checkInfo() {
        if (document.getElementById("filesn").value == "") {
            return false
        } else {
            return true
        }
    }
</script>